#pragma once

#include <stdint.h>

#include <string>

namespace hawking {
namespace indexlib {

class MurmurHash {
public:
    static uint64_t MurmurHash64A(const void* key, int32_t len, uint64_t seed);
    static uint64_t MurmurHash64A(const void* key, int32_t len, uint64_t seed, uint64_t salt);

private:
    MurmurHash();
    ~MurmurHash();
    MurmurHash(const MurmurHash&);
    MurmurHash& operator=(const MurmurHash&);
};

inline uint64_t MurmurHashCalc(const std::string& str) {
    return MurmurHash::MurmurHash64A(str.c_str(), str.length(), 545609244UL);
}

}
}
